package com.fzn3.day04;

/**
 * @author fzn
 * 描述：递归反向打印字符串
 * @program DataStructure
 * @create 2023/3/9 17:05
 **/
public class ReversePrintString {
    public static void f(int n, String str) {
        if (n == str.length()) {
            return;
        }
        f(n + 1, str);
        System.out.print(str.charAt(n));
    }

    public static void main(String[] args) {
        f(0, "abcd");
    }
}
